#include "XThread.h"

XThread::XThread()
{

}

XThread::~XThread()
{

}

bool XThread::isExit()
{
	return isExit_;
}

void XThread::Start()
{
	isExit_ = false;
	th_ = std::thread(&XThread::Main, this);
}

void XThread::Stop()
{
	isExit_ = true;
	Wait();
}

void XThread::Wait()
{
	if (th_.joinable())
		th_.join();
}